<!DOCTYPE html>
<ui:composition template="/template/layout.xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:p="http://primefaces.org/ui"
	xmlns:o="http://omnifaces.org/ui">

	<ui:define name="titulo">Sistema Financeiro</ui:define>

	<ui:define name="corpo">

		<div class="row-fluid">

			<div class="span12">

				<div class="span4">

					<h:form id="form">
					
						<p:dataTable value="#{contaFinanceiraController.listaContaFinanceiraUserLogado()}" var="item" type="definition"
						emptyMessage="Nenhuma Conta Financeira Cadastrada!">

							<f:facet name="header">
					            <h:outputText value="Resumo da Posição Financeira" />
					        </f:facet>

							<p:column headerText="Conta">
								<h:outputText value="#{item.nomeContaFinanceira}" />
							</p:column>

							<p:column headerText="Saldo">
								<h:outputText value="#{item.saldo}">
									<f:convertNumber pattern="#{contaFinanceiraController.formatoValorReal}" />
								</h:outputText>
							</p:column>
							
							 <p:columnGroup type="footer">
					            <p:row>
					                <p:column footerText="Saldo total:" />
					                <p:column footerText="R$ #{contaFinanceiraController.totalSaldoUsuarioLogado()}" />
					            </p:row>
					        </p:columnGroup>
												
						</p:dataTable>
					</h:form>

				</div>

				<div class="span8" align="right">

					<h:graphicImage library="img" name="img-principal.jpg" />

				</div>

			</div>

		</div>

	</ui:define>

</ui:composition>